<?php
	/*
	 * @author		: Mauricio Amorim
	 * @data		: 07/07/2010
	 * @version		: 1.1 (ingl�s)
	 * @description	: 	Classe para conex�es com o banco de dados mysql
	 */


$DEBUG_MODE		= TRUE;
$USE_DATA_BASE	= TRUE;

$SYSTEM_MAIL		= "arezzo@ven.to";
$SYSTEM_MAIL_FROM  	= "fulera123";
$ARRAY_LOCALE 		= array("ptbr", "en", "es");
$UPLOAD_IMG_PATH	= "upload/img/";
$UPLOAD_FILE_PATH	= "upload/file/";

/* template vars */
if($_SERVER['REMOTE_ADDR'] == "127.0.0.1"){
	$URL 		 = "http://localhost/forum/";
}else{
	$URL 		 = "http://arezzo.ven.to/";
}
$TEMPLATE_PATH 		= $URL."template/admin/";

if($USE_DATA_BASE){
	if($_SERVER['REMOTE_ADDR'] == "127.0.0.1"){
		$db_host     = "localhost";
		$db_user     = "root";
		$db_password = "";
		$db_database = "forum";
	}else{	
		$db_host     = "forum";
		$db_user     = "";
		$db_password = "";
		$db_database = "";
	}//endif;
	try{
		$db_link = mysql_connect($db_host, $db_user, $db_password);
		if(!mysql_errno()){
			$temp_connect = mysql_select_db($db_database , $db_link);
			if(mysql_errno()){
				echo "erro ao selecionar database:".mysql_error();
				exit();
			}
			include_once("facil3/core/DbInterface.class.php");
			$DbInterface = new DbInterface();
		} else {
			echo "erro de conexão com o banco 1 ";
			exit();
		}
	} catch (Exception $e){
		$ReturnResultVO->sucess  = FALSE;
		$ReturnResultVO->addMessage($e);
		echo "erro de conexão com o banco";
		exit();
	}
}
?>
